package com.macro.mall.service.impl;

import java.util.List;

import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.macro.mall.dto.BmsMuseumTeamDetail;
import com.macro.mall.dto.BmsMuseumTeamParam;
import com.macro.mall.mapper.BmsMuseumTeamMapper;
import com.macro.mall.model.BmsMuseumTeam;
import com.macro.mall.service.BmsMuseumTeamService;

@Service
public class BmsMuseumTeamServiceImpl implements BmsMuseumTeamService {

    @Autowired
    private BmsMuseumTeamMapper bmsMuseumTeamMapper;

    @Override
    public List<BmsMuseumTeam> getList(BmsMuseumTeamParam bmsMuseumTeamParam) {
        return bmsMuseumTeamMapper.findList(bmsMuseumTeamParam);
    }

    @Override
    public BmsMuseumTeamDetail getItem(Long id) {
        BmsMuseumTeam bmsMuseumTeam = bmsMuseumTeamMapper.selectByPrimaryKey(id);
        BmsMuseumTeamDetail detail = new BmsMuseumTeamDetail();
        BeanUtils.copyProperties(bmsMuseumTeam, detail);
        return detail;
    }
}
